import request from '@/utils/request'

export function login(data) {
  console.log(data)
  return request({
    url: '/userservice/tb-user/login',
    method: 'post',
    /*封装成json格式传递给后台*/
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/userservice/tb-user/info',
    method: 'get',
    params: { token }
  })
}

export function getEchartsData() {
  return request({
    url: '/userservice/tb-user/echarts',
    method: 'get'
  })
}

export function exportUserList(tbUserVO) {
  return request({
    url: `/userservice/tb-user/export`,
    method: 'post',
    data: tbUserVO,
    responseType: "blob"
  })
}

export function logout() {
  return request({
    url: '/userservice/tb-user/logout',
    method: 'post'
  })
}

export function getUserList(current,size,tbUserVO) {
  return request({
    url: `/userservice/tb-user/findUserPage/${current}/${size}`,
    method: 'post',
    data: tbUserVO
  })
}
